package com.example.mapper;

import com.example.pojo.TbResume;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ResumeMapper {

    @Select("select * from tb_resume")
    List<TbResume> findAll();

    @Update("UPDATE tb_resume SET address = #{address},name = #{name},phone = #{phone} WHERE id = #{id}")
    Integer update(TbResume tbResume);

    @Insert("INSERT INTO tb_resume(address,name,phone) VALUES(#{address},#{name},#{phone})")
    Integer insert(TbResume tbResume);

    @Delete("DELETE FROM tb_resume WHERE id = #{id}")
    Integer deleteById(Integer id);

}
